package com.zsrt.day20170506.socket;

import java.io.IOException;
import java.io.OutputStream;
import java.net.Socket;
import java.net.UnknownHostException;

/**
*@author jzh
*@创建时间 2017年5月6日下午4:04:17
*类说明：
*/
public class ClientSocketTest {
	
	public static void main(String[] args) throws IOException {
		Socket s=new Socket("192.168.3.196",2222);
		OutputStream os = s.getOutputStream();
		
		String str="jinzhihui";
		byte[] bytes = str.getBytes();
		os.write(bytes);
		os.flush();
		os.close();
		s.close();
	}
	
	

}
